{% extends 'base_temp.html' %} {% load static %}
{% block title %}添加主机-*{% endblock %}

{% block page_css_js_plugin %}

{% endblock %}

{% block content %}
    
    <div class="row row-cards-pf">  <!-- row -->
        <!-- Important:  if you need to nest additional .row within a .row.row-cards-pf, do *not* use .row-cards-pf on the nested .row  -->

        <ol class="breadcrumb">
            <li><a href="{% url 'index' %}"><i class="fa fa-dashboard"> </i> 主页</a></li>
            <li><a href="{% url 'supervisor_list' %}"><i class="fa fa-product-hunt"> </i> 进程列表</a></li>
            <li>添加主机</li>
        </ol>
        <hr>


        <h1>添加主机</h1>
        <p>添加主机 --> 触发model信号 --> 通过XML api(主机、IP、port、username、password)连接目标主机获取所有进程信息--> 信息存储入库</p>
        <br>
        <form class="form-horizontal" action="{% url 'supervisor_addhost' %}" method="post"> {% csrf_token %}
            <div class="form-group">
                <label class="col-md-2 control-label" for="hostname_input">hostname:</label>
                <div class="col-md-6">
                    <input type="text" id="hostname_input" class="form-control" name="hostname" placeholder="请输入主机名">
                    {% if form.errors.hostname %}
                    <span class="text-danger has-error">{{ form.errors.hostname.as_text  }}</span>
                    {% endif  %}
                </div>
            </div>
            <div class="form-group">
                <label class="col-md-2 control-label" for="ip_input">IP:</label>
                <div class="col-md-6">
                    <input type="text" id="ip_input" class="form-control" name="ip" placeholder="请输入IP">
                    {% if form.errors.ip %}
                    <span class="text-danger has-error">{{ form.errors.ip.as_text  }}</span>
                    {% endif  %}
                </div>
            </div>
            <div class="form-group">
                <label class="col-md-2 control-label" for="port_input">port</label>
                <div class="col-md-6">
                    <input type="number" id="port_input" class="form-control" name="port" value="9001">
                    {% if form.errors.port %}
                        <span class="text-danger has-error">{{ form.errors.port.as_text }}</span>
                    {% endif %}
                </div>
            </div>

            <div class="form-group">
                <div class="col-md-10 col-md-offset-2">
                    <input type="submit" class="btn btn-primary" value="提交">
                    <input type="reset" class="btn btn-default" value="重置">
                </div>
            </div>
        </form>


        <hr>

    </div><!-- /col -->





{% endblock %}


{% block page_javascript %}
   
{% endblock %}